//
//  JOFriendCell.m
//  qq好友
//
//  Created by song on 15/1/19.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import "JOFriendCell.h"
#import "JOFriend.h"
@implementation JOFriendCell


+(instancetype)cellWithTableView:(UITableView *)tableView
{
    NSString *ID= @"cell";
    JOFriendCell *cell =[tableView dequeueReusableCellWithIdentifier:ID];
    if(cell ==nil)
    {
        cell = [[self alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
        
    }
    return cell;
    
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    return  [super initWithStyle:style reuseIdentifier:reuseIdentifier];
}


-(void)setFriend:(JOFriend *)friend
{
    _friend = friend;
    self.imageView.image =[UIImage imageNamed:friend.icon];
    self.textLabel.text = friend.name;
    self.detailTextLabel.text =friend.intro;
}


@end
